---
id: 614387cbefeeba5f3654a291
title: Hatua ya 7
challengeType: 0
dashedName: step-7
---

# --description--

Baada ya kipengele chako cha `header`, unda `div` iliyo na `class` iliyowekwa kuwa `author`.

Ndani ya `div` hiyo, unda kipengele cha `p` chenye `class` ya `author-name` na uipe maandishi ya `By freeCodeCamp`. Funga sehemu ya `freeCodeCamp` katika kipengele cha `a` na `href` iliyowekwa kwa `https://freecodecamp.org`, na `target` iliyowekwa kuwa `_blank`.


Hapa chini, ongeza kipengele cha pili cha `p` chenye class ya `publish-date` na maandishi `March 7, 2019`.

# --hints--

Unapaswa kuunda kipengele kipya cha `div`.

```js
assert.exists(document.querySelector('div'));
```

Kipengele chako cha `div` kinafaa kuja baada ya kipengele chako cha `header`.

```js
assert(document.querySelector('div')?.previousElementSibling?.localName === 'header');
```

Kipengee chako cha `div` kinapaswa kuwa na `class` ya `author`.

```js
assert(document.querySelector('div')?.className === 'author');
```

Unapaswa kuwa na vipengele viwili vya `p`.

```js
assert(document.querySelectorAll('p')?.length === 3);
```

Vipengele vyako viwili vipya vya `p` vinapaswa kuwa ndani ya kipengele chako `div`.

```js
assert.exists(document.querySelector('div')?.querySelectorAll('p')?.length === 2);
```

Kipengee chako cha kwanza cha `p` kinapaswa kuwa na `class` iliyowekwa kuwa `author-name`.

```js
assert(document.querySelector('div')?.querySelector('p')?.className === 'author-name');
```

Kipengele chako kipya cha kwanza cha `p` kinapaswa kuwa na maandishi `By freeCodeCamp`.

```js
assert(document.querySelector('div')?.querySelector('p')?.innerText === 'By freeCodeCamp');
```

Kipengee chako cha pili cha `p` kinapaswa kuwa na `class` iliyowekwa kuwa `publish-date`.

```js
assert(document.querySelector('div')?.querySelectorAll('p')?.[1]?.className === 'publish-date');
```

Kipengele chako cha pili cha `p` kinapaswa kuwa na maandishi `March 7, 2019`.

```js
assert(document.querySelector('div')?.querySelectorAll('p')?.[1]?.innerText === 'March 7, 2019');
```

Unapaswa kuunda kipengele kipya cha `a`.

```js
assert.exists(document.querySelector('a'));
```

Kipengele chako cha `a` kinapaswa kuwa ndani ya kipengele chako cha kwanza cha `p`.

```js
assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.localName === 'a');
```

Kipengee chako cha `a` kinapaswa kuwa na `href` iliyowekwa kuwa `https://freecodecamp.org`.

```js
assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.getAttribute('href') === 'https://freecodecamp.org');
```

Kipengee chako cha `a` kinapaswa kuwa na `target` iliyowekwa kuwa `_blank`.

```js
assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.getAttribute('target') === '_blank');
```

Kipengele chako cha `a` kinapaswa kuzunguka maandishi ya `freeCodeCamp`.

```js
assert(document.querySelector('div')?.querySelector('p')?.firstElementChild?.innerText === 'freeCodeCamp');
```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Magazine</title>
    <link
      href="https://fonts.googleapis.com/css?family=Anton%7CBaskervville%7CRaleway&display=swap"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
    />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <main>
      <section class="heading">
        <header class="hero">
          <img
            src="https://cdn.freecodecamp.org/platform/universal/fcc_meta_1920X1080-indigo.png"
            alt="freecodecamp logo"
            loading="lazy"
            class="hero-img"
            width="400"
          />
          <h1 class="hero-title">OUR NEW CURRICULUM</h1>
          <p class="hero-subtitle">
            Our efforts to restructure our curriculum with a more project-based
            focus
          </p>
        </header>
--fcc-editable-region--

      </section>
    </main>
--fcc-editable-region--
  </body>
</html>
```

```css

```
